package com.bjesc_b2c.app.appraiset.mvp.presenter.impl;

import android.content.Context;

import com.bjesc_b2c.app.appraiset.mvp.model.CustomerModel;
import com.bjesc_b2c.app.appraiset.mvp.model.impl.CustomerModelImpl;
import com.bjesc_b2c.app.appraiset.mvp.presenter.CustomerPresenter;
import com.bjesc_b2c.app.appraiset.mvp.view.CustomerView;

import master_bean.CustomerInfoBean;

/**
 * Created by yidong on 2017/5/24.
 */

public class CustomerPresenterImpl implements CustomerPresenter,CustomerModelImpl.CallBack{

    private CustomerView cusView;
    private CustomerModel customerModel;
    public CustomerPresenterImpl(CustomerView cusView){
        this.cusView = cusView;
        customerModel = new CustomerModelImpl(this);
    }
    @Override
    public void requestCustomer(String id) {
        customerModel.requestCustomer((Context)cusView,id);
    }

    @Override
    public void modifyCustimerInfo(Context context, String disid,CustomerInfoBean infoBean) {
        customerModel.modifyCustimerInfo(context,disid,infoBean);
    }

    @Override
    public void callback(CustomerInfoBean bean) {
        cusView.getCustimerInfo(bean);
    }

}
